﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Admin/Views/Shared/AdminMaster.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
</br>
<div class="row-fluid">
    <div class="span3">
        <div class="widget green">
            <div class="widget-title">
                <h4><i class="icon-search"></i>&nbsp;Tìm kiếm</h4>
                <span class="tools"><a class="icon-chevron-down" href="javascript:;"></a></span>
            </div>
            <div class="widget-body">
                <div class="control-group">
                    <div class="controls">
                        <div class="input-icon left">
                            <i class="icon-user"></i>
                            <input class="span12" id="kw1" type="text" placeholder="Tên"></input>
                        </div>
                    </div>
                </div>
                <div class="control-group">            
                    <div class="controls">    
                        &nbsp;<i class="icon-windows"></i>&nbsp;Lớp  
                        <input class="span12" id="kw2" type="text" placeholder="Lớp"></input>
                        <%--<%: Html.DropDownList("Lớp", (SelectList)ViewData["Lop"], new {@id="kw2"})%>--%>
                        <%--&nbsp;<i class="icon-windows"></i>&nbsp;Lớp --%>
                    </div>
                </div>
                <div class="control-group">            
                    <div class="controls">  
                        &nbsp;<i class="icon-map-marker"></i>&nbsp;Chi nhánh        
                        <%--<input class="span12" id="kw3" type="text" placeholder="Chi nhánh"></input>--%>
                        <%: Html.DropDownList("Chi nhánh", (SelectList)ViewData["ChiNhanh"], new {@id="kw3"})%>
                        
                    </div>
                </div>
                <div class="control-group">
                    <button class="btn btn-large btn-danger pull-right" type="button" onclick="javascript:searchingRequest();">Tìm</button>                   
                    <br /><br /><br />
                    <div id="infoHocVien" class="alert alert-block alert-error fade in"></div>              
                </div>       
            </div>
        </div>
    </div>
    <div class="span9">
        <div class="widget blue span12">
            <div class="widget-title">
                <h4><i class="icon-reorder"></i>&nbsp;Kết quả tìm kiếm</h4>
            </div>   
            <div class="widget-body">    
                <div id="searchingResult">

                </div>
            </div>
        </div>
    </div>
</div>
<!---->
    <script type="text/javascript">
        function searchingRequest(page) {
            var keyword1 = document.getElementById("kw1").value;
            var keyword2 = document.getElementById("kw2").value;
            var keyword3 = document.getElementById("kw3").value;
            $.ajax(
                {
                    type: "POST",
                    url: "<%=ResolveUrl("~/")%>Admin/Accountancy/Search",
                    data: { kw1: keyword1, kw2: keyword2, kw3: keyword3, p:page},
                    success: function (result) {
                        $("#searchingResult").html(result.toString());
                    },
                    error: function (xhr, ajaxOptions, thrownError) {
                        thrownError;
                        $("#searchingResult").html("Không tìm thấy dữ liệu yêu cầu");
                    }
                });
        }
    </script>
</asp:Content>

